package at.fhj.swd11.leitner.ue1;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.Vector;

public class Uebung01 {

	public static void main(String[] args) {
		BufferedReader filereader;
		String line;
		Vector<Person> daten=new Vector<Person>();
		
		try {
			filereader=new BufferedReader(new FileReader("C:\\_java\\liste.txt"));
			while((line=filereader.readLine())!=null) {
				String lineSplit[]=line.split(";");
				daten.add(new Person(lineSplit[0], lineSplit[1], Integer.parseInt(lineSplit[2]), lineSplit[3]));
			}
			filereader.close();
			for (Person person:daten) {
				person.printPerson();
			}
		} catch (IOException e){
			System.out.println("Fehler beim lesen der Datei");
		}

		
		
	}

}
